package com.ruoyi.resume.service.impl;

import java.util.List;

import com.ruoyi.resume.domain.SchoolMajor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.resume.mapper.SchoolMapper;
import com.ruoyi.resume.domain.School;
import com.ruoyi.resume.service.ISchoolService;

/**
 * 学校Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-04
 */
@Service
public class SchoolServiceImpl implements ISchoolService 
{
    @Autowired
    private SchoolMapper schoolMapper;

    /**
     * 查询学校
     * 
     * @param id 学校主键
     * @return 学校
     */
    @Override
    public School selectSchoolById(Long id)
    {
        return schoolMapper.selectSchoolById(id);
    }

    /**
     * 查询学校列表
     * 
     * @param school 学校
     * @return 学校
     */
    @Override
    public List<School> selectSchoolList(School school)
    {
        return schoolMapper.selectSchoolList(school);
    }


    /**
     * 新增学校
     * 
     * @param school 学校
     * @return 结果
     */
    @Override
    public int insertSchool(School school)
    {
        return schoolMapper.insertSchool(school);
    }

    /**
     * 修改学校
     * 
     * @param school 学校
     * @return 结果
     */
    @Override
    public int updateSchool(School school)
    {
        return schoolMapper.updateSchool(school);
    }

    /**
     * 批量删除学校
     * 
     * @param ids 需要删除的学校主键
     * @return 结果
     */
    @Override
    public int deleteSchoolByIds(Long[] ids)
    {
        return schoolMapper.deleteSchoolByIds(ids);
    }

    /**
     * 删除学校信息
     * 
     * @param id 学校主键
     * @return 结果
     */
    @Override
    public int deleteSchoolById(Long id)
    {
        return schoolMapper.deleteSchoolById(id);
    }

    @Override
    public List<SchoolMajor> selectSchoolMajorList() {
        return schoolMapper.selectSchoolMajorList();
    }
}
